/*
 * $Id: RootTreeNode.java,v 1.2 2002/12/07 18:02:19 jppietsch Exp $
 * Copyright (C) 2002 Jan-Peter Pietsch
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
package de.jppietsch.prefedit;

import com.webcamtracker.configuration.RootPref;

import javax.swing.tree.DefaultMutableTreeNode;
import java.util.prefs.BackingStoreException;


/**
 * A special tree node class is needed for the root, because there is no
 * preferences object representing it.
 *
 * @author Jan-Peter Pietsch
 * @version $Revision: 1.2 $
 */
public class RootTreeNode extends DefaultMutableTreeNode {

    /**
     * Constructs this virtual root of all preferences with two child nodes -
     * one for the system preferences and one for the user preferences.
     *
     * @throws BackingStoreException If something goes wrong.
     */
    public RootTreeNode() throws BackingStoreException {
//        add(new PreferencesTreeNode(Preferences.systemRoot(), Rsc.SYSTEM_ROOT));
        add(new PreferencesTreeNode(RootPref.getRootPref(), Rsc.USER_ROOT));
    }


    /**
     * Description of the Method
     *
     * @return Description of the Returned Value
     */
    public String toString() {
        return Rsc.getBundle().getString(Rsc.ROOT);
    }

}
